<html><head><title>SoundPlugin.pb</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font><font color="#3A3966">;   PureBasic - Sound example file
</font><font color="#3A3966">;
</font><font color="#3A3966">;    (c) Fantaisie Software
</font><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font>
<b><font color="#3A3966">If</font></b> <font color="#3A3966">InitSound</font>() = 0
<font color="#3A3966">  MessageRequester</font>(&quot;Error&quot;, &quot;Can't open DirectX 7 or no sound card is available&quot;,  0)
  <b><font color="#3A3966">End</font></b>
<b><font color="#3A3966">EndIf</font></b>

<font color="#3A3966">UseOGGSoundDecoder</font>()

SoundFileName$ =<font color="#3A3966"> OpenFileRequester</font>(&quot;Choose a sound file&quot;, &quot;&quot;, &quot;Wave or OGG files|*.wav;*.ogg&quot;,0)
<b><font color="#3A3966">If</font></b> SoundFileName$
  <b><font color="#3A3966">If</font></b> <font color="#3A3966">LoadSound</font>(0, SoundFileName$)
<font color="#3A3966">    PlaySound</font>(0,<font color="#924B72">#PB_Sound_Loop</font>)
<font color="#3A3966">    MessageRequester</font>(&quot;Sound&quot;, &quot;Playing the sound (loop)...&quot;+<font color="#3A3966">Chr</font>(10)+&quot;Click to quit..&quot;, 0)
  <b><font color="#3A3966">Else</font></b>
<font color="#3A3966">    MessageRequester</font>(&quot;Error&quot;, &quot;Can't load the sound.&quot;, 0)
  <b><font color="#3A3966">EndIf</font></b>
<b><font color="#3A3966">EndIf</font></b>
<b><font color="#3A3966">End</font></b>   </font></pre>
</body></html>
